<div class="fui-cell-group" {guanlians} style="margin:0;padding:0">
<div class="fui-cell must">
					<div class="fui-cell-icon">
                        <i class="icon icon-shumashouji"></i>
                    </div>
					<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入您的手机号"  ng-model="{tovalue}.{name}" /></div>
					<div class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" style="line-height: 0.5rem;" ng-click="pagedata.send_smscode({tovalue}.{name})" id="smscode">获取验证码</a></div>
</div>
<div class="fui-cell must">
					<div class="fui-cell-icon">
                        <i class="icon icon-pic"></i>
                    </div>
					<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="图片验证码" ng-model="pagedata.item.code" /></div>
					<div class="fui-cell-remark noremark">
						<a class="" href="javascript:;" id="code" ng-click="code_image('imgverify')">
							<img id="imgverify" src="" style="height:1.6rem;line-height:1.6rem;color:#999;font-size:0.6rem" title="点击更换验证码"/>
						</a>
					</div>
</div>
<div class="fui-cell must ">
					<div class="fui-cell-icon">
                        <i class="icon icon-code"></i>
                    </div>
					<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="{tovalue}.smscode" /></div>
</div>
</div>
<script>
scope.code_image('imgverify')
scope.pagedata.send_smscode=function(mobile){			
		if(!mobile){
			alert('请先填写手机号！');
			return false;
		}
		if(scope.{tovalue}.oldmobile && scope.{tovalue}.oldmobile==mobile){
			alert('新手机号不能跟原手机号一样！');
			return false;
		}
		if(!scope.pagedata.item.code){
			alert('请先填写下面的图片验证码！');
			return false;
		}
		if(scope.pagedata.mobile_code_sending){
			return false;
		}
		var params={'data':{'mobile':mobile,'code':scope.pagedata.item.code},'op':'send2','action':'tools.sms_code'};
		params.callback=function(res){
			if(res=='success'){
				scope.pagedata.mobile_code_sending=true;
				scope.count_down(60,'smscode','秒后重新发送',function(){
					$('#smscode').text('重新发送');
					scope.pagedata.mobile_code_sending=false;
				});
				alert('发送成功！');
			}else{
				alert(res.msg);
			}
		}
		scope.post_json(params);
}
</script>